<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>机构信息</title>
</head>
<body>
	<div id='panel' class="easyui-panel" title="机构信息" fit="true">
		<input type="hidden" id="orgId" name="organization.id" value="${organization.id}" >
		<input type="hidden" name="organization.parentId" id="orgPId" value="${organization.parentId}" >
		<div class="modal fade" id="organizationAddModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">  
  			<div class="modal-dialog">  
 		   		<div class="modal-content">  
					<div class="modal-header">
 		       			<h4 class="modal-title" id="myModalLabel">添加机构</h4>
 	     			</div>
  	    			<div class="modal-body">
						<form id="add" action="system/organization!saveForAddOrganization.action">
							<input type="hidden" name="organization.parentId" value="${organization.id}" >
							<input type="text" title="机构名称" name="organization.organizationName" maxlength="50" required>
							<textarea rows="5" title="备注" cols="" name="organization.memo" maxlength="200"></textarea>
							<div class="text-center">
								<input type="submit" value="提交" class='btn btn-primary' />
								<input type="button" value="取消" class='btn btn-warning' onclick="$('#organizationAddModal').modal('hide');" />
							</div>
						</form>
  	    			</div>
  		  		</div>
			</div>
		</div>
		<div class="modal fade" id="organizationUpdateModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">  
  			<div class="modal-dialog">  
    			<div class="modal-content">  
					<div class="modal-header">
     		   			<h4 class="modal-title" id="myModalLabel">修改机构</h4>
    	  			</div>
     	 			<div class="modal-body">
						<form id="update" action="system/organization!saveForUpdateOrganization.action">
							<input type="hidden" id="orgId" name="organization.id" value="${organization.id}" >
							<input type="hidden" name="organization.parentId" id="orgPId" value="${organization.parentId}" >
							<input type="text" title="机构名称" name="organization.organizationName" maxlength="50" value="${organization.organizationName }" required>
							<textarea rows="5" title="备注" cols="" name="organization.memo" maxlength="200">${organization.memo }</textarea>
							<div class="text-center">
								<input type="submit" value="提交" class='btn btn-primary' />
								<input type="button" value="取消" class='btn btn-warning' onclick="$('#organizationUpdateModal').modal('hide');" />
							</div>
						</form>
      				</div>
 		   		</div>
			</div>
		</div>
		<div class="modal fade" id="selectManagerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">  
  			<div class="modal-dialog">  
    			<div class="modal-content">  
					<div class="modal-header">
     		   			<h4 class="modal-title" id="myModalLabel">选择负责人</h4>
    	  			</div>
     	 			<div class="modal-body">
						<form id="selectManage" action="system/organization!saveForSelectManager.action">
							<input type="hidden" id="orgId" name="organization.id" value="${organization.id}" >
							<input type="hidden" name="organization.parentId" id="orgPId" value="${organization.parentId}" >
							<input type="hidden" class="managerSelector" id="manager" name="organization.manager" />
							<select title="负责人:" id="sel" style="width:155px">
								<option>请选择</option>
							</select>
							<div class="text-center">
								<input type="submit" value="提交" class='btn btn-primary' />
								<input type="button" value="取消" class='btn btn-warning' onclick="$('#selectManagerModal').modal('hide');" />
							</div>
						</form>
      				</div>
 		   		</div>
			</div>
		</div>
		<table class="view">
			<tr>
				<th width='30%'>机构名称</th>
				<td>${organization.organizationName }</td>
			</tr>
			<tr>
				<th>备注</th>
				<td>${organization.memo }</td>
			</tr>
		</table>
    </div>
	<script type="text/javascript" src="res/page/system/organization_view.js"></script>
</body>
</html>